<template>
	<view id="container">
		<logo position="left"></logo>
		<view id="question">
			<view>
				<h3>总排名</h3>
				<uni-table border stripe emptyText="暂无更多数据">
					<uni-tr>
						<uni-th align="center">排名</uni-th>
						<uni-th align="center">昵称</uni-th>
						<uni-th align="left">答题数</uni-th>
						<uni-th align="left">答对题数</uni-th>
						<uni-th align="left">正确率</uni-th>
						<uni-th align="left">分数</uni-th>
					</uni-tr>
					<uni-tr v-for="(item,index) in doorRankList">
						<uni-td>{{item.rank}}</uni-td>
						<uni-td>{{item.nickName}}</uni-td>
						<uni-td>{{item.count}}</uni-td>
						<uni-td>{{item.rightCount}}</uni-td>
						<uni-td>{{item.count==0?'0':(item.rightCount/item.count*100).toFixed(2)}}%</uni-td>
						<uni-td>{{item.score}}</uni-td>
					</uni-tr>
				</uni-table>
			</view>
		</view>
	</view>
</template>

<script>
	import logo from "@/component/common/logo.vue";
	export default {
		components: {
			logo
		},
		data() {
			return {
				doorRankList: [] //总排名
			}
		},
		onLoad() {
			this.init();
		},
		onUnload() {
		},
		methods: {
			init() {
				const zoomId = this.$route.query.zoomId;
				this.$request({
					url:"/system/zoom/result",
					data:{zoomId,zoomId},
					success:function(res){
						console.log(res);
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	@import '@/static/css/start.css';
</style>